package com.zhida.smartcontrol.launch.bottom;

import java.util.LinkedHashMap;

/**
 * Created by tan on 2017/9/19 019.
 * 底部按钮构建器
 */
public class ItemBuilder {

    private final LinkedHashMap<BottomTabBean, BottomItemFragment> ITMES = new LinkedHashMap<>();

    static ItemBuilder builder() {
        return new ItemBuilder();
    }

    public final ItemBuilder addItem(BottomTabBean bean, BottomItemFragment fragment) {
        ITMES.put(bean, fragment);
        return this;
    }

    public final ItemBuilder addItems(LinkedHashMap<BottomTabBean, BottomItemFragment> items) {
        ITMES.putAll(items);
        return this;
    }

    public final LinkedHashMap<BottomTabBean, BottomItemFragment> build() {
        return ITMES;
    }
}
